package cn.cxj.order.service.impl;

import cn.cxj.order.mapper.AdoptOrderMapper;
import cn.cxj.order.mapper.ProductOrderMapper;
import cn.cxj.order.query.AdoptOrderQuery;
import cn.cxj.order.query.ProductOrderQuery;
import cn.cxj.order.service.IOrderCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderCountServiceImpl implements IOrderCountService {
    
    @Autowired
    private AdoptOrderMapper adoptOrderMapper;
    
    @Autowired
    private ProductOrderMapper productOrderMapper;
    
    @Override
    public Long[] queryOrderCount() {
        Long[] arr = new Long[5];
        Long adoptOrderCount = adoptOrderMapper.queryCount(new AdoptOrderQuery());
        arr[0] = adoptOrderCount;
        Long productOrderCount = productOrderMapper.queryCount(new ProductOrderQuery());
        arr[1] = productOrderCount;
        //@TODO 以下为假数据 模块未开发
        arr[2] = 10L;
        arr[3] = 12L;
        arr[4] = 15L;
        return arr;
    }
}
